import Vue from 'vue'
import Router from 'vue-router'
import home from '@/views/home2/index'
import sign from '@/views/home2/sign'
import project from '@/views/project/index'
import apply from '@/views/project/apply'

import vip from '@/views/vip/index'
import vip2 from '@/views/vip/index2'
import charge from '@/views/vip/charge'
import cashout from '@/views/vip/cashout'
import notice from '@/views/vip/notice'
import notice2 from '@/views/vip/notice2'
import carryover from '@/views/vip/carry_over'
import custom from '@/views/custom/index'
import Investmentdetails from '@/views/project/Investmentdetails' //投资详情
import we from '@/views/we/index' //我们
import banklist from '@/views/bank/list' //银行卡列表
import bankadd from '@/views/bank/add' //添加银行卡
import authentication from '@/views/authentication/index' //实名认证
import calculator from '@/views/calculator/index' //收益计算器
import result from '@/views/calculator/result' //收益计算器结果
import capitaldetails from '@/views/capitaldetails/index' //资金明细
import capitalname from '@/views/capitaldetails/projectname' //项目名称
import orderlist from '@/views/order/index' //订单管理列表
import logistics from '@/views/order/logistics' //物流详情
import harvestaddress from '@/views/harvestaddress/index' //收货地址
import harvestaddressAdd from '@/views/harvestaddress/add' //收货地址
import recharge from '@/views/recharge/index' //银行入款充值
import art from '@/views/art/index' //


import login from '@/views/login/index'
import regis from '@/views/login/regis'
import forget from '@/views/login/forget'
import setup from '@/views/login/setup'
import changeName from '@/views/login/change_name'
import changeAvatar from '@/views/login/change_avatar'
import safeCenter from '@/views/login/safeCenter'
import setPassword from '@/views/login/setPassword'
import setPasswordPay from '@/views/login/setPasswordPay'
import alipay from '@/views/pay/alipay'
import wechatPay from '@/views/pay/wechatPay'
import invited from '@/views/invited/index'




Vue.use(Router)


export default new Router({
  // routes: [{
  routes: [{
      path: '/login',
      name: 'login',
      component: login
    },
    {
      path: '/regis',
      name: 'regis',
      component: regis
    },
    {
      path: '/forget',
      name: 'forget',
      component: forget
    },
    {
      path: '/setup',
      name: 'setup',
      component: setup
    },
    {
      path: '/changeName',
      name: 'changeName',
      component: changeName
    },
    {
      path: '/changeAvatar',
      name: 'changeAvatar',
      component: changeAvatar
    },
    {
      path: '/safeCenter',
      name: 'safeCenter',
      component: safeCenter
    },

    {
      path: '/setPassword',
      name: 'setPassword',
      component: setPassword
    },
    {
      path: '/setPasswordPay',
      name: 'setPasswordPay',
      component: setPasswordPay
    },
    {
      path: '/alipay',
      name: 'alipay',
      component: alipay
    },
    {
      path: '/wechatPay',
      name: 'wechatPay',
      component: wechatPay
    },
    {
      path: '/invited',
      name: 'invited',
      component: invited
    },

    {
      path: '/',
      name: 'home',
      component: home
    },

    {
      path: '/sign',
      name: 'sign',
      component: sign
    },

    {
      path: '/project',
      name: 'project',
      component: project,
    },

    {
      path: '/apply',
      name: 'apply',
      component: apply,
    },

    
    {
      path: '/Investmentdetails',
      name: 'Investmentdetails',
      component: Investmentdetails,
    },
    {
      path: '/we',
      name: 'we',
      component: we
    },
    {
      path: '/vip',
      name: 'vip',
      component: vip,
      // children: [{
      //   path: 'cashout',
      //   name: 'cashout',
      //   component: cashout,
      // }]

    },

    {
      path: '/vip2',
      name: 'vip2',
      component: vip2,
      // children: [{
      //   path: 'cashout',
      //   name: 'cashout',
      //   component: cashout,
      // }]

    },
    {
      path: '/charge',
      name: 'charge',
      component: charge

    },
	{
	      path: '/carryover',
	      name: 'carryover',
	      component: carryover
	
	    },
	    {
	        path: '/cashout',
	        name: 'cashout',
	        component: cashout
	  
	      },
	      {
	        path: '/notice',
	        name: 'notice',
	        component: notice
	  
        },
        {
	        path: '/notice2',
	        name: 'notice2',
	        component: notice2
	  
	      },
    
    {
      path: '/custom',
      name: 'custom',
      component: custom
    },
    {
      path: '/banklist',
      name: 'banklist',
      component: banklist
    },
    {
      path: '/bankadd',
      name: 'bankadd',
      component: bankadd
    },
    {
      path: '/authentication',
      name: 'authentication',
      component: authentication
    },
    {
      path: '/calculator',
      name: 'calculator',
      component: calculator
    },
    {
      path: '/result',
      name: 'result',
      component: result
    },
    {
      path: '/capitaldetails',
      name: 'capitaldetails',
      component: capitaldetails
    },
    {
      path: '/capitalname',
      name: 'capitalname',
      component: capitalname
    },
    {
      path: '/orderlist',
      name: 'orderlist',
      component: orderlist
    },
    {
      path: '/logistics',
      name: 'logistics',
      component: logistics
    },
    {
      path: '/harvestaddress',
      name: 'harvestaddress',
      component: harvestaddress
    },
    {
      path: '/harvestaddressAdd',
      name: 'harvestaddressAdd',
      component: harvestaddressAdd
    },
    {
      path: '/recharge',
      name: 'recharge',
      component: recharge
    },
    {
      path: '/art',
      name: 'art',
      component: art
    },
    
  ]
})



// import Vue from "vue";

// import VueRouter from "vue-router";
// import home from "../views/home"; // 首页
// import investmentprojects from "../views/investmentprojects"; // 投资项目
// import membercenter from "../views/membercenter"; // 会员中心

// Vue.use(VueRouter);

// let routerArr = [
//     home, // 首页
//     investmentprojects, // 投资项目
//     membercenter, // 会员中心
// ];

// let routes = [];
// routerArr.forEach((val) => {
//     routes = routes.concat(val.routes);
// });

// const router = new VueRouter({
//     routes,
// });
// const originalPush = VueRouter.prototype.push
// VueRouter.prototype.push = function push(location) {
//     return originalPush.call(this, location).catch(err => err)
// }
// export default router;